package ebuy.com.config;



import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class FilterCoufig {
    @Bean
    public FilterRegistrationBean registFilter() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(new CostTimeFilter());
        registration.addUrlPatterns("/*");//过滤所有的请求
        registration.setName("CostTimeFilter");
        registration.setOrder(1);
    return registration;
    }
}
